<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
	<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
		<!DOCTYPE >
		<html>

		<head>
			<base href="<%=basePath%>">
			<title>地贫筛查</title>
			<meta charset="utf-8" />
			<meta http-equiv="X-UA-Compatible" content="IE=edge" />
			<meta name="viewport" content="width=device-width, initial-scale=1" />
			<link rel="icon" href="favicon.ico" />
			<link href="static/manage-sys/css/bootstrap.min.css" rel="stylesheet" />
			<link href="static/manage-sys/css/font-awesome.min.css" rel="stylesheet" />
			<link href="static/manage-sys/css/default.css" rel="stylesheet" type="text/css" />
			<script src="static/manage-sys/js/jquery.min.js"></script>
			<!--[if lt IE 9]>
			  <script src="js/bootstrap/html5shiv.min.js"></script>
			  <script src="js/bootstrap/respond.min.js"></script>
			<![endif]-->
			<!--页面加载进度条-->
			<link href="static/manage-sys/css/pace/dataurl.css" rel="stylesheet" />
			<script src="static/manage-sys/js/pace/pace.min.js"></script>
			<script src="static/manage-sys/js/jquery.scrolltopcontrol/scrolltopcontrol.js" type="text/javascript"></script>
			<script src="static/manage-sys/js/jquery.extend.js" type="text/javascript"></script>
			<script src="static/manage-sys/js/default.js" type="text/javascript"></script>

			<link rel="stylesheet" type="text/css" href="static/manage-sys/add-sample/easyui/themes/ui-cupertino/easyui.css" />
			<link rel="stylesheet" type="text/css" href="static/manage-sys/add-sample/easyui/themes/icon.css" />
			<link rel="stylesheet" type="text/css" href="static/manage-sys/add-sample/css/icon.css" />
			<link rel="stylesheet" type="text/css" href="static/manage-sys/add-sample/css/uims.css" />
			<link rel="stylesheet" type="text/css" href="static/manage-sys/add-sample/css/temp.css" />
             <!-- 地贫筛查页面样式文件-->
			<link rel="stylesheet" type="text/css" href="static/manage-sys/add-sample/css/dipin.css" />

			<script type="text/javascript" src="static/manage-sys/add-sample/easyui/jquery.easyui.min.js"></script>
			<script type="text/javascript" src="static/manage-sys/add-sample/easyui/locale/easyui-lang-zh_CN.js"></script>

			<script src="static/manage-sys/js/bootstrap/bootstrap.min.js"></script>
			<script src="static/manage-sys/js/bootstrap/bootstrap-table.min.js"></script>
			<script src="static/manage-sys/js/bootstrap/bootstrap-table-zh-CN.min.js"></script>

			<script type="text/javascript" src="static/manage-sys/add-sample/js/dataGridCellTip.js"></script>
			<script type="text/javascript" src="static/manage-sys/add-sample/js/validate.js"></script>
			<script type="text/javascript" src="static/manage-sys/add-sample/js/json2.js"></script>

			<script type="text/javascript" src="static/manage-sys/add-sample/js/sampleCommon.js"></script>
			<script type="text/javascript" src="static/manage-sys/add-sample/js/template.js"></script>
			<script type="text/javascript" src="static/manage-sys/add-sample/js/diping.js"></script>

			<!-- artTemplate 模板引擎 -->
			<script src="static/manage-sys/js/template-web.js" type="text/javascript"></script>

			<!-- 设置送检单位 -->
			<script src="static/manage-sys/js/set-customer.js" type="text/javascript"></script>

		</head>

		<body>
			<!--我是主要内容-->
			<div class="container">
				<div class="content">
					<div class="coupon-box" onclick="chooseCoupon()">
						选择免费券
					</div>
					<table class="second-table t-group">
						<thead></thead>
						<tbody>
							<tr class="blue-tr">
								<td class="droppable t-group-title">送检单位信息</td>
							</tr>
							<tr>
								<td class="droppable">
									<span class="field t-group-item">
										<span class="required">*</span>
										<i class="t-field-id" data-value="customerCode"></i>
										<i class="t-type" data-value="text"></i>
										<i class="t-name t-require">送检单位</i>：
										<select value="" class="addressCounty" onchange="onAddressCountyChange(this.value)"></select>
										<input id="customerCode" style="width:168px;" class="easyui-combobox" data-options="valueField:'customerCode',textField:'customerName'">
									</span>
								</td>
							</tr>
							<tr>
								<td class="droppable">
									<span class="field t-group-item">
										<i class="t-field-id" data-value="departments"></i>
										<i class="t-name">送检科室</i>：
										<input type="text" id="departments" class="t-value">
									</span>
									<span class="field t-group-item">
										<i class="t-field-id" data-value="doctorName"></i>
										<i class="t-name">送检医生</i>：
										<input type="text" id="doctorName" class="t-value">
									</span>
								</td>
							</tr>
						</tbody>
					</table>
					<table class="second-table t-group">
						<tr class="blue-tr">
							<td class="droppable t-group-title">样本信息</td>
						</tr>
						<tr>
							<td class="droppable t-group-item">
								<span>
									<i class="t-field-id" data-value="sampleType"></i>
									<span class="required">*</span>
									<i class="t-name t-require">样本类型</i>：
								</span>
								<span class="sample-type field">
									<input value="01" type="checkbox" class="t-value" data-name="全血" data-value="01">全血
								</span>
								<span class="sample-type field">
									<input value="03" type="checkbox" class="t-value" data-name="DNA" data-value="03">DNA
								</span>
								<span class="sample-type field">
									<input value="05" type="checkbox" class="t-value" data-name="干血片" data-value="05">干血片
								</span>
								<span class="sample-type field">
									<input value="18" type="checkbox" class="t-value" data-name="唾液" data-value="18">唾液
								</span>
								<span class="sample-type field">
									<input value="32" type="checkbox" class="t-value" data-name="其他" data-value="32" id="sampleType_32">其他
									<span class="field t-group-item-child sampleType_32">
										<i class="t-field-id" data-value="sampleTypeOther"></i>
										<i class="t-name" style="display:none;">样本其他类型的名称</i>：
										<i class="t-hint" data-value="请输入样本类型"></i>
										<input type="text" id="sampleTypeOther">
									</span>
								</span>
							</td>
						</tr>
						<tr>
							<td class="droppable">
								<span class="field t-group-item">
									<span class="required">*</span>
									<i class="t-field-id" data-value="bloodDate"></i>
									<i class="t-type" data-value="date"></i>
									<i class="t-name t-require">采样日期</i>：
									<input type="date" id="bloodDate" validate="required">
								</span>
							</td>
						</tr>
					</table>
					<table class="second-table t-group">
						<tbody>
							<tr class="blue-tr">
								<td class="droppable t-group-title">受检者基本信息</td>
							</tr>
							<tr>
								<td class="droppable">
									<span class="field t-group-item">
										<span class="required">*</span>
										<i class="t-field-id" data-value="sampleName"></i>
										<i class="t-name t-require">姓名</i>：
										<input type="text" id="sampleName" validate="required" style="width: 120px;">
									</span>
									<span class="field t-group-item">
										<span class="required">*</span>
										<i class="t-field-id" data-value="sampleSex"></i>
										<i class="t-name t-require">性别</i>：
										<select id="sampleSex" style="width: 80px;" validate="required">
											<option value="0" class="t-value" data-name="未知" data-value="0">未知</option>
											<option value="1" class="t-value" data-name="男" data-value="1">男</option>
											<option value="2" class="t-value" data-name="女" data-value="2">女</option>
										</select>
									</span>
									<span class="field t-group-item">
										<span class="required">*</span>
										<i class="t-field-id" data-value="sampleAge"></i>
										<i class="t-type" data-value="number"></i>
										<i class="t-name t-require">年龄</i>：
										<input type="number" id="sampleAge" validate="required" style="width: 140px;">
									</span>
									<span class="field t-group-item">
										<span class="required">*</span>
										<i class="t-field-id" data-value="motherPhoneNum"></i>
										<i class="t-type" data-value="phoneNum"></i>
										<i class="t-name t-require">联系电话</i>：
										<input type="text" id="motherPhoneNum" validate="required,phoneNum" style="width: 171px;" class="t-value">
									</span>
								</td>
							</tr>
							<tr>
								<td class="droppable column3">
									<span class="field t-group-item">
										<i class="t-field-id" data-value="oldSampleNum"></i>
										<i class="t-type" data-value="text"></i>
										<i class="t-name">原样品编号</i>：
										<input type="text" id="oldSampleNum" style="width:170px">
									</span>
									<span class="field t-group-item">
										<i class="t-field-id" data-value="nationaltily"></i>
										<i class="t-type" data-value="nationaltily"></i>
										<i class="t-name">民族</i>：
										<input type="text" id="nationaltily">
									</span>
									<span class="field t-group-item">
										<i class="t-field-id" data-value="nativePlace"></i>
										<i class="t-type" data-value="nativePlace"></i>
										<i class="t-name">籍贯</i>：
										<input type="text" id="nativePlace">
									</span>
								</td>
							</tr>
							<tr>
								<td class="droppable column3">
									<span class="field t-group-item">
										<i class="t-field-id" data-value="idCard"></i>
										<i class="t-type" data-value="idCard"></i>
										<i class="t-name">身份证号</i>：
										<input type="text" id="idCard" validate="idCard" style="width:170px" class="t-value">
									</span>
									<span class="field t-group-item">
										<i class="t-field-id" data-value="hosptialNum"></i>
										<i class="t-name">住院号</i>：
										<input type="text" id="hosptialNum" class="t-value">
									</span>
									<span class="field t-group-item">
										<i class="t-field-id" data-value="bedNum"></i>
										<i class="t-name">床号</i>：
										<input type="text" id="bedNum" class="t-value">
									</span>
								</td>
							</tr>
						</tbody>
					</table>
					<table class="second-table t-group">
						<tr class="blue-tr">
							<td class="droppable t-group-title">临床信息</td>
						</tr>
						<tr>
							<td class="droppable">
								<span class="group-field field t-group-item" style="margin-right: 50px;" validate="required">
									<span class="required">*</span>
									<i class="t-field-id" data-value="transfusionHistory"></i>
									<i class="t-name t-require">是否有输血史</i>：
									<input name="xx0.9624982114365845" id="transfusionHistory_0" type="checkbox" class="t-value" data-name="是
												" data-value="0">是
									<input name="xx0.9624982114365845" id="transfusionHistory_1" type="checkbox" class="t-value" data-name="否
												" data-value="1">否
								</span>
								<span class="field t-group-item">
									<i class="t-field-id" data-value="transfusionDate"></i>
									<i class="t-type" data-value="date"></i>
									<i class="t-name">输血时间</i>：
									<input type="date" id="transfusionDate">
								</span>
							</td>
						</tr>
						<tr>
							<td class="droppable t-group-item">
								<span>
									<i class="t-field-id" data-value="clinicalExamination"></i>
									<i class="t-type" data-value="split"></i>
									<i class="t-name">临床检查</i>：
									<span class="t-group-item-split">
										<i class="t-field-id" data-value="clinicalExamination0"></i>
										<i class="t-hint" data-value=""></i>
										<i class="t-type" data-value="text"></i>
										<i class="t-name">HGB(g/L)</i>：
										<input type="text" id="clinicalExamination0" style="width:40px;" />
									</span>&nbsp;
									<span class="t-group-item-split">
										<i class="t-field-id" data-value="clinicalExamination1"></i>
										<i class="t-hint" data-value=""></i>
										<i class="t-type" data-value="text"></i>
										<i class="t-name">MCV(fL)</i>：
										<input type="text" id="clinicalExamination1" style="width:40px;" />
									</span>&nbsp;
									<span class="t-group-item-split">
										<i class="t-field-id" data-value="clinicalExamination2"></i>
										<i class="t-hint" data-value=""></i>
										<i class="t-type" data-value="text"></i>
										<i class="t-name">MCH(pg)</i>：
										<input type="text" id="clinicalExamination2" style="width:40px;" />
									</span>&nbsp;
									<span class="t-group-item-split">
										<i class="t-field-id" data-value="clinicalExamination3"></i>
										<i class="t-hint" data-value=""></i>
										<i class="t-type" data-value="text"></i>
										<i class="t-name">HbA2(%)</i>：
										<input type="text" id="clinicalExamination3" style="width:40px;" />
									</span>&nbsp;
									<span class="t-group-item-split">
										<i class="t-field-id" data-value="clinicalExamination4"></i>
										<i class="t-hint" data-value=""></i>
										<i class="t-type" data-value="text"></i>
										<i class="t-name">HbF(%)</i>：
										<input type="text" id="clinicalExamination4" style="width:40px;" />
									</span>&nbsp;
									<span class="t-group-item-split">
										<i class="t-field-id" data-value="clinicalExamination5"></i>
										<i class="t-hint" data-value=""></i>
										<i class="t-type" data-value="text"></i>
										<i class="t-name">其他</i>：
										<input type="text" id="clinicalExamination5" style="width:40px;" />
									</span>
								</span>
							</td>
						</tr>
					</table>
					<table class="second-table t-group">
						<tbody>
							<tr class="blue-tr">
								<td class="droppable t-group-title">产品信息</td>
							</tr>
							<tr>
								<td class="droppable">
									<span class="field t-group-item-product">
										<input id="product_DX0016" type="checkbox" disabled="disabled">
										<b>
											<span id="productName_DX0016" class="t-product-name">地贫筛查</span>
										</b>（
										<i class="t-product-value">DX0016</i>）
									</span>
								</td>
							</tr>
						</tbody>
					</table>
				</div>
				<div style="width:220px; margin: 30px auto;">
					<button onclick="save();" style="width: 120px; height: 33px; border-radius: 2px; border-radius: 4px; background:
												 rgb(23,134,184); color: #fff; outline: none; border-color: transparent;">保存</button>
				</div>
			</div>

			<!-- 模态框（Modal） -->
			<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
				<div class="modal-dialog">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
								&times;
							</button>
							<h4 class="modal-title" id="myModalLabel">
								免费券列表
							</h4>
						</div>
						<div class="modal-body">
							<div class="search-box" style='display:flex;flex-direction:row'>
								<input type="text" placeholder="请输入证件号码" id="coupon-kw" style="display:inline-block;flex:1">
								<button onclick="searchCoupons()">搜索</button>
							</div>
							<div class="no-coupon">
								不使用免费券
							</div>
							<div class="empty-coupon">
								没有免费券
							</div>
							<div class="coupon-list">
							</div>
						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-default" data-dismiss="modal">
								关闭
							</button>
						</div>
					</div>
					<!-- /.modal-content -->
				</div>
				<!-- /.modal -->
			</div>

			<a href="#top" id="goTop">
				<i class="fa fa-angle-up fa-3x"></i>
			</a>
			<script type="text/javascript">
                $("#product_DX0016")[0].checked = true;
			</script>
			<!-- 优惠券列表渲染 -->
			<script id="coupon-list" type="text/html">
				{{each rows item i}}
					<div class="coupon-item">
						<div class="content-wrapper">
							<div class="name">{{item.couponName}}</div>
							<div class="desc">{{item.couponDesc}}</div>
						</div>
						{{if item.productCode == 'DX0016' && item.status == '1'}}
							<button class="btn btn-primary" onclick="useCoupon('{{item.couponNum}}')">使用</button>
						{{/if}}
						{{if item.productCode != 'DX0016' || (item.productCode == 'DX0016' && item.status != '1')}}
							<button class="btn btn-disbled" disabled>不可用</button>
						{{/if}}
					</div>
				{{/each}}
			</script>
		</body>

		</html>